package cn.lili.controller.feign.redpack;

import cn.lili.modules.member.client.RedPackUserClient;
import cn.lili.modules.member.entity.dos.RedPackUser;
import cn.lili.modules.member.service.RedPackUserService;
import cn.lili.modules.payment.entity.dto.UserRedPackUpdateDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequiredArgsConstructor
public class RedPackUserFeignController implements RedPackUserClient {

    private final RedPackUserService redPackUserService;
    @Override
    public RedPackUser getRedPackUser(String userId) {
        return redPackUserService.getRedPackUser(userId);
    }

    @Override
    public void updateMemberRedPack(UserRedPackUpdateDTO userRedPackUpdateDTO) {
        redPackUserService.updateMemberRedPack(userRedPackUpdateDTO);
    }

    @Override
    public List<RedPackUser> getListByLastTime() {
        return redPackUserService.getListByLastTime();
    }

    @Override
    public void updateById(RedPackUser redPackUser) {
        redPackUserService.updateById(redPackUser);
    }
}
